﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="details.aspx.cs" Inherits="AdventureWorksWebApp.details" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" ClientIDMode="Static"
    runat="server">
    <div id="header">
        <h2>
            Szczegóły produktu</h2>
    </div>
    <div id="details">
    
        <asp:Label ID="lbProductName" runat="server" Text="Product Name: " CssClass="details_labels" />
        <asp:TextBox ID="txtProductName" runat="server" CssClass="details_text" />
        <asp:Label ID="lbProductNumber" runat="server" Text="Product Number: " CssClass="details_labels" />
        <asp:TextBox ID="txtProductNumber" runat="server" CssClass="details_text" />
        <asp:Label ID="lblCategory" runat="server" Text="Category: " CssClass="details_labels" />
        <asp:TextBox ID="txtCategory" runat="server" CssClass="details_text" Enabled="false" />
        <asp:DropDownList ID="ddCategory" runat="server" CssClass="details_text" OnSelectedIndexChanged="ddCategory_SelectedIndexChanged" AutoPostBack="true">
        </asp:DropDownList>
        <asp:Label ID="lblSubcategory" runat="server" Text="Subcategory: " CssClass="details_labels" />
        <asp:TextBox ID="txtSubcategory" runat="server" CssClass="details_text" Enabled="false" />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Panel ID="Panel2" runat="server">
                    <asp:DropDownList ID="ddSubcategory" runat="server" CssClass="details_text">
                    </asp:DropDownList>
                </asp:Panel>
            </ContentTemplate>
            <Triggers>
            <asp:AsyncPostBackTrigger ControlID="ddCategory" EventName="SelectedIndexChanged" />
            </Triggers>
        </asp:UpdatePanel>
        
        <asp:Label ID="lbSafetyStockLevel" runat="server" Text="Safety Stock Level: " CssClass="details_labels" />
        <asp:TextBox ID="txtSafetyStockLevel" runat="server" CssClass="details_text" />
        <asp:Label ID="lbReorderPoint" runat="server" Text="Reorder Point" CssClass="details_labels" />
        <asp:TextBox ID="txtReorderPoint" runat="server" CssClass="details_text" />
        <asp:Label ID="lbStandardCost" runat="server" Text="Standard Cost: " CssClass="details_labels" />
        <asp:TextBox ID="txtStandardCost" runat="server" CssClass="details_text" />
        <asp:Label ID="lbListPrice" runat="server" Text="List Price: " CssClass="details_labels" />
        <asp:TextBox ID="txtListPrice" runat="server" CssClass="details_text" />
        <asp:Label ID="lbDaysToManufacture" runat="server" Text="Days To Manufacture: " CssClass="details_labels" />
        <asp:TextBox ID="txtDaysToManufacture" runat="server" CssClass="details_text" />
        <asp:Label ID="lbRowGUID" runat="server" Text="Row GUID" CssClass="details_labels" />
        <asp:TextBox ID="txtRowGUID" runat="server" CssClass="details_text" />
        <asp:Label ID="lbMakeFlag" runat="server" Text="Make Flag" CssClass="details_labels" />
        <asp:CheckBox ID="chbMakeFlag" runat="server" CssClass="details_text" />
        <asp:Label ID="lbFinishedGoodsFlag" runat="server" Text="Finished Goods Flag" CssClass="details_labels" />
        <asp:CheckBox ID="chbFinishedGoodsFlag" runat="server" CssClass="details_text" />
        
        <asp:Image ID="productImage" runat="server" ImageUrl='<%# "imageHandler.ashx?ProductID=" + id %>'/>

    </div>
    <div id="buttons">
        <asp:LinkButton ID="lnkSave" runat="server" Text="Zapisz" Visible="false" OnClick="lnkSave_Click" CssClass="button" />
        <asp:LinkButton ID="lnkAnuluj" runat="server" Text="Anuluj" Visible="false" 
            onclick="lnkAnuluj_Click" CssClass="button"/>        
        <asp:LinkButton ID="lnkEdit" runat="server" Text="Edytuj" OnClick="lnkEdit_Click" CssClass="button"/>
        <asp:LinkButton ID="lnkDelete" runat="server" Text="Usuń" OnClick="lnkDelete_Click" CssClass="button"/>
        <asp:LinkButton ID="lnkBack" runat="server" Text="Powrót do menu" PostBackUrl="~/index.aspx" CssClass="button" />
    </div>
    <asp:Panel ID="Panel1" runat="server" BackColor="White" CssClass="messagebox">
        <div class="center">
            <asp:Label ID="Label1" runat="server" Text="Czy na pewno chcesz usunąć wybrany produkt?"
                CssClass="message"></asp:Label>
                <br />
            <asp:LinkButton ID="LinkButton1" runat="server" Text="Tak" CssClass="button" OnClick="LinkButton1_Click" />
            <asp:LinkButton ID="LinkButton2" runat="server" Text="Nie" CssClass="button" />
        </div>
    </asp:Panel>
    <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" CancelControlID="LinkButton2"
        PopupControlID="Panel1" TargetControlID="lnkDelete" BackgroundCssClass="background">
    </asp:ModalPopupExtender>
</asp:Content>